const axios = require("axios");
const token = JSON.parse(localStorage.getItem("token"));
if (!token) {
	location.href = "./login.html";
}
//首页数据的渲染
axios.defaults.baseURL = "http://fitness.h5.itsource.cn:3701";
axios.defaults.headers.common["Authorization"] = "Bearer " + token;
module.exports = axios;
